const fs = require('fs')
const { PassThrough, Writable } = require('node:stream');
const pass = new PassThrough();
const writable = new Writable();

pass.pipe(writable);
pass.unpipe(writable);
// readableFlowing 现在为 false。

console.log(pass.readableFlowing)
pass.on('data', (chunk) => { console.log(chunk.toString()); });
pass.write('ok');  // 不会触发 'data'。
console.log('写入')
pass.resume();     // 必须调用才能使流触发 'data'。
console.log(pass.readableFlowing)




